#ifndef tlmRmtCfgDataInfo_H
#define tlmRmtCfgDataInfo_H

#include "Telematics.h"
#include "tlmServiceApp.h"
//## attribute mDataInfoBuffer
#include "msgbuf.h"

#include "tlmRmtCfgParaAdmin.h"
//## attribute mParaNavi
#include "tlmRmtCfgParaNavi.h"
//## attribute mParaWeb
#include "tlmRmtCfgParaWeb.h"


//## operation SetItsService(tlmServiceApp)
class tlmServiceApp;

//## class tlmRmtCfgDataInfo
class tlmRmtCfgDataInfo {
    ////    Friends    ////
    
public :


    ////    Constructors and destructors    ////
    
    //## operation tlmRmtCfgDataInfo(uint8_t*,uint32_t)
    tlmRmtCfgDataInfo(uint8_t* bufPtr, uint32_t size);
    
    //## operation tlmRmtCfgDataInfo()
    tlmRmtCfgDataInfo();
    
    //## auto_generated
    virtual ~tlmRmtCfgDataInfo();
    
    ////    Operations    ////
    
    //## operation Fill()
    virtual void Fill();
    
    // get the length of data info, which should include the first escape byte 0x7E.
    //## operation GetDataInfoSize() const
    uint32_t GetDataInfoSize() const;
    
    // This function return the max data info size, it's used to allocate enough memory
    //## operation GetMaxDataInfoSize()
    virtual uint32_t GetMaxDataInfoSize();
    
    //## operation GetParaAdmin()
    tlmRmtCfgParaAdmin* GetParaAdmin();
    
    //## operation GetParaNavi()
    tlmRmtCfgParaNavi* GetParaNavi();
    
    //## operation GetParaWeb()
    tlmRmtCfgParaWeb* GetParaWeb();
    
    // Init is use current service's setting to initialize the components
    // This is always used by out message
    //## operation Init()
    virtual void Init();
    
    // ParseInit is used to parse the incoming message and initialize dataiofo components.
    //## operation ParseInit()
    virtual BOOL ParseInit();
    
    //## operation SetDataInfoBuf(uint8_t*,uint32_t)
    void SetDataInfoBuf(uint8_t* bufPtr, uint32_t size);
    
    // This function translates escape byte to actual byte
    //## operation TranslateData(uint8_t)
    uint8_t TranslateData(uint8_t data);

	//## operation SetItsService(tlmServiceApp)
    void SetItsService(tlmServiceApp* srv);
    
    ////    Additional operations    ////
    
protected :

    msgbuf mDataInfoBuffer;		//## attribute mDataInfoBuffer
    
    // this is the actual data info size, includs the first escape byte 0x7E
    uint32_t mDataInfoSize;		//## attribute mDataInfoSize
    
    tlmServiceApp * mItsService;		//## attribute mItsService

    tlmRmtCfgParaAdmin mParaAdmin;		//## attribute mParaAdmin
    
    tlmRmtCfgParaNavi mParaNavi;		//## attribute mParaNavi
    
    tlmRmtCfgParaWeb mParaWeb;		//## attribute mParaWeb
};
#endif
